//
//  ListTableViewCell.swift
//  GFQM
//
//  Created by iSolar on 2017/5/16.
//  Copyright © 2017年 iSolar. All rights reserved.
//

import UIKit
import SnapKit

class ListTableViewCell: UITableViewCell {

    var songName: UILabel!
    var singer: UILabel!
    var type: UILabel!
    var moreBtn: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        addSubview(songName)
        addSubview(singer)
        addSubview(type)
        addSubview(moreBtn)
        songName.font = UIFont.systemFont(ofSize: 14)
        songName.textColor = UIColor.black
        songName.snp.makeConstraints { (make) -> Void in
            make.left.equalTo(songName.superview!).offset(15)
            make.top.equalTo(10)
            make.height.equalTo(20)
        }
        type.font = UIFont.systemFont(ofSize: 11)
        type.textColor = UIColor.lightGray
        type.snp.makeConstraints{(make) -> Void in
            make.bottom.equalTo(singer.superview!).offset(-10)
            make.left.equalTo(songName.right).offset(10)
            make.height.equalTo(20)
            make.width.equalTo(80)
        }
        singer.font = UIFont.systemFont(ofSize: 14)
        singer.textColor = UIColor.black
        singer.snp.makeConstraints { (make) ->Void in
            make.bottom.equalTo(-10)
            make.left.height.equalTo(songName)
            make.width.equalTo(200)
        }
        moreBtn.setImage(UIImage(named:"more2"), for: .normal)
        moreBtn.snp.makeConstraints { (make) in
            make.right.equalTo(-15)
            make.centerY.equalTo(moreBtn.superview!)
        }
        
    }
    
}
